//  Abstract:
//    GUI handler
//
//  Reference:
//
//  Design Notes:
//
//  Disclaimer:
//    Copyright (C) 2008, Janice Law <janicel700@gmail.com>.
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
#include <libglademm.h>
#include <gtkmm.h>
#include <boost/shared_ptr.hpp>
#include "ocf.h"
#include "opf.h"

using Glib::RefPtr;
using namespace boost;

namespace gopsed
{
class MainWindow : public Gtk::Window
{
    public:
        MainWindow(BaseObjectType* base_object,
                const RefPtr<Gnome::Glade::Xml>& glade_xml);
        void LoadFile(const ustring fileName);
    protected:
        RefPtr<Gnome::Glade::Xml> glade;
        shared_ptr<Epub::Ocf> epub_archive;
        shared_ptr<Epub::Opf> opf_obj;
        void on_quit();
        void on_about();
        void on_new();
        void on_open();
        void on_save();
        void on_save_as();
        void on_cut();
        void on_copy();
        void on_paste();
        void on_delete();
        void on_button_title();
        void on_button_language();
        void on_button_identifier();
        void on_button_creator();
        void on_button_subject();
        void on_button_description();
        void on_button_publisher();
        void on_button_contributor();
        void on_button_date();
        void on_button_type();
        void on_button_format();
        void on_button_source();
        void on_button_relation();
        void on_button_coverage();
        void on_button_rights();
        void RefreshLine(ustring const widgetName,
                Epub::Opf::ustring_1_list widgetData);
        void RefreshLine(ustring const widgetName,
                Epub::Opf::ustring_2_list widgetData);
        void RefreshLine(ustring const widgetName,
                Epub::Opf::ustring_3_list widgetData);
        void RefreshData();
        Epub::Opf::ustring_1_list UpdateLine(ustring const widgetName,
                Epub::Opf::ustring_1_list widgetData);
        Epub::Opf::ustring_2_list UpdateLine(ustring const widgetName,
                Epub::Opf::ustring_2_list widgetData);
        Epub::Opf::ustring_3_list UpdateLine(ustring const widgetName,
                Epub::Opf::ustring_3_list widgetData);
        void UpdateData();
};
} // Gopsed
